package com.itheima.dao;

import com.itheima.pojo.CategoryMenu;
import com.itheima.pojo.PictureSort;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

public interface CategoryMenuMapper extends Mapper<CategoryMenu> {

    @Select(" SELECT summary FROM t_category_menu WHERE url=#{url};")
    String selectSummaryByUrl(@Param("url") String url);


    @Select("select max(sort) from t_category_menu")
    Integer selectSortMax();

    @Update("update t_category_menu set sort=#{sort} where uid=#{uid}")
    void updateSortMax(@Param("uid") String uid, @Param("sort") Integer sort);
}
